package com.finger.orderservice.client;

import com.finger.modelservice.result.Result;
import com.finger.modelservice.vo.hosp.ScheduleOrderVo;
import com.finger.modelservice.vo.order.OrderMqVo;
import com.finger.modelservice.vo.order.SignInfoVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Repository
@FeignClient("service-hosp")
public interface HospClient {

    // 根据排班id获取排班信息
    @GetMapping("site/hospital/api/inner/findScheduleOrderVO/{scheduleId}")
    public ScheduleOrderVo findScheduleOrderVO(@PathVariable String scheduleId);

    // 根据医院编号获取签名和api路径
    @GetMapping("site/hospitalset/api/inner/findSignInfoVO/{hoscode}")
    public SignInfoVo findSignInfoVO(@PathVariable String hoscode);

    // 订单完成之后更新mongo中的排班可预约数量
    @PutMapping("site/hospital/api/inner/updateSchedule")
    public Result updateSchedule(@RequestBody OrderMqVo orderMqVo);
}
